import 'package:flutter/material.dart';
import 'package:flutter_kit_dsp/flutter_kit_dsp.dart';

import '../../common/bg_page.dart';
import '../../common/chat_page.dart';
import '../../tool/assets.dart';
import 'xo_bottom.dart';
import 'xo_middle.dart';

class MyXo extends CrossoverPageDelegate {
  @override
  Widget build(BuildContext context) {
    return SizedBox.expand(
      child: Stack(
        children: [
          Positioned.fill(child: BgPage(bg: assets.B5, logo: assets.L5)),

          const Positioned.fill(
            child: Padding(
              padding: EdgeInsets.all(10),
              child: Column(
                children: [
                  ///图标
                  Flexible(flex: 5, child: ChartPage()),

                  ///中间滑动部分
                  Flexible(flex: 5, child: XoMiddle()),

                  ///底部分
                  Flexible(flex: 2, child: XoBottom()),
                ],
              ),
            ),
          ),

          ///退出按钮
          Positioned(left: 10, bottom: 10, child: backButtom(context))
        ],
      ),
    );
  }
}
